%garomonic
nmax=7999;
n=0:nmax;
Fs=nmax+1;
%bits=16;
f1=1000;
y1=sin(2*pi*f1/Fs*n);
figure(1),plot(n(1:200),y1(1:200)),grid
%sound(y1,Fs,bits)
%wavplay(y1,Fs,'sync')
figure(2),plot((1:length(y1))/length(y1),abs(fft(y1))),grid
figure(3),psd(y1,[],Fs)
%figure(3),pwelch(y1,[],[],[],Fs)
figure(4),specgram(y1,[],Fs),colormap gray

%speech
[y2,Fs,bits]=wavread('FSpeech.wav');
figure(5),plot(y2),grid
figure(6),plot((1:length(y2))/length(y2),abs(fft(y2))),grid
figure(7),psd(y2,[],Fs)
%figure(7),pwelch(y2,[],[],[],Fs)
figure(8),specgram(y2,[],Fs),colormap gray
